package com.hb.software.entity.salary;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hb.software.domain.BaseEntity;
import com.hb.software.entity.worker.Worker;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Accessors(chain=true)
public class Salary extends BaseEntity<Long> implements Serializable {
    //    Worker worker;
    private String name;
    private double basicSalary;//基础薪资
    private double salary;//薪资
    @DateTimeFormat(pattern="yyyy-MM-dd")//控制入参
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")//控制出参
    private Date datetime;
    private double profitBonus;//奖金
    private Long wid;
//    List<SalaryMessage> salaryMessages;
}